<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <common-head></common-head>
    
  </div>
  <script src="./vue.global.js"></script>
  <script>
    const { createApp } = Vue;
    const app = createApp();
    const CommonLogo = {
      template: `
            <div>
              <h2>这是头部中的logo组件</h2>
            </div>
          `
    }
    const CommonHead = {
      template: `
        <div>
          <h1>这是父组件组件</h1>  
          <common-logo/>
        </div>
      `,
      data(){
        return {
          msg: '父组件中的数据'
        }
      },
      components: {
        CommonLogo
      }
    }
    app.component('CommonHead', CommonHead)
    app.mount('#app')
  </script>
</body>

</html>